<?php

namespace Yearnfar\Bundle\BlogBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * @Route("/msg")
 * @Template()
 */
class MsgController extends BaseController
{
    /**
     * @Route("/show")
     * @Template()
     */
    public function showAction()
    {
        $attri = $this->get('request')->attributes;

        $class = $attri->get('class', '');
        $url   = $attri->get('url', '/');
        $time  = $attri->get('time', 3);
        $msg   = $attri->get('msg', '');

        return array('class' => $class, 'url' => $url, 'time'  => $time, 'msg' => $msg);
    }

}
